// server.js
//创建入口文件
require('dotenv').config();
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;

// 中间件
app.use(express.json());
app.use(express.urlencoded({ extended: true }));

// 路由
const airQualityRouter = require('./routes/airQuality');
app.use('/api/air-quality', airQualityRouter);

app.listen(port, () => {
  console.log(`Server running on port ${port}`);
});